Repository navigation
Assorted bug fixes - #270
Conversation
nicoweidner
left a comment
There was a problem hiding this comment.
Thanks a lot for updating this! I just left a few minor comments
| # Implement the auto feature that becomes available in 3.6 | ||
| autoinc = 0 |
There was a problem hiding this comment.
This looks like it's redundant now?
| super(RelationshipInfoWriter, self).__init__(document, out) | ||
|
|
||
| def create_relationship_node(self, relationship): | ||
| def create_relationshiptype(self, relationshiptype: str) -> str: |
There was a problem hiding this comment.
Should be relationship_type. Can you rename the properties on the Relationship class? Applies to spdxelementid and relatedspdxelement as well
There was a problem hiding this comment.
Also:
- the method name doesn't match what the method does anymore. Something like
transform_relationship_type_to_rdf_modelmaybe? (but maybe you have a less clunky idea) - The logic looks a bit cryptic now. Maybe you can include an example in the docstring?
- This is a conversion from upper snake case (hope that term exists...) to camel case, right? If so, we could mention that
| self.graph.add(type_triple) | ||
|
|
||
| relationship_type_node = Literal(relationship.relationshiptype) | ||
| relationship_spdx_element = Literal(relationship.spdxelementid) |
There was a problem hiding this comment.
relationship_spdx_element_id
| ) | ||
| ) | ||
| relationship_type = self.create_relationshiptype(relationship.relationshiptype) | ||
| relationship_type_node = self.spdx_namespace["relationshipType_" + relationship_type] |
There was a problem hiding this comment.
If the method currently named create_relationshiptype retains the purpose of "converting to rdf-compatible style", I would include adding the relationshipType_ prefix in that method.
nicoweidner
left a comment
There was a problem hiding this comment.
Thanks for addressing the comments!
This code is based on commits of the WhiteSource PS Team, esp. the authors: tamari-oz, NatalyaDalid, rammatzkvosky and DimarrWS. Thank you for your contribution! Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
This code is based on commits of the WhiteSource PS Team, esp. the authors: tamari-oz, NatalyaDalid, rammatzkvosky and DimarrWS. Thank you for your contribution! Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
This code is based on commits of the WhiteSource PS Team, esp. the authors: tamari-oz, NatalyaDalid, rammatzkvosky and DimarrWS. Thank you for your contribution! Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
This code is based on commits of the WhiteSource PS Team, esp. the authors: tamari-oz, NatalyaDalid, rammatzkvosky and DimarrWS. Thank you for your contribution! Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
This code is based on commits of the WhiteSource PS Team, esp. the authors: tamari-oz, NatalyaDalid, rammatzkvosky and DimarrWS. Thank you for your contribution! Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
d385001 to
7522e19
Compare
nicoweidner
left a comment
There was a problem hiding this comment.
One more time after the force push
Taken over from #263 resp. #207 because signoffs were missing.
This code is based on commits of the WhiteSource PS Team, esp. the authors: @tamari-oz, @NatalyaDalid, @rammatzkvosky and @DimarrWS. Thank you for your contribution!